package org.easymodelers.gmf.creator.template;

import org.easymodelers.gmf.utils.ModelsManager;
import org.easymodelers.template.NamespaceData;
import org.easymodelers.template.TemplateHandler;
import org.eclipse.gmf.tooldef.GMFToolFactory;
import org.eclipse.gmf.tooldef.ToolRegistry;

public abstract class AbstractToolTemplateBasedElementDefinitionHandler extends AbstractTemplateBasedElementDefinitionHandler {

	protected void initializeTemplateHandler(TemplateHandler templateHandler, ModelsManager modelsManager) {
		ToolRegistry toolRegistry = modelsManager.getToolRegistry();

		templateHandler.registerDefaultNamespaces();
		templateHandler.registerNamespace(
				new NamespaceData("gmftool", "http://www.eclipse.org/gmf/2005/ToolDefinition",
									GMFToolFactory.eINSTANCE, toolRegistry));
	}
}
